﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MailServerViewModels>" %>

<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Lib.Paging" %>
<%@ Import Namespace="SDT.Admin.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sửa mail server
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    
    <%if (ViewData["MessageInfo"] == null)
      { %>
    <% using (Html.BeginForm("edit", "mailserver", FormMethod.Post, new
       {
           id = "adminForm"
       }))
       {%>
    <%= Html.ValidationSummary(true)%>
    <table class="admintable" width="100%">
        <tbody>
            <tr>
                <td class="key">
                    Tên (<font color="red">*</font>)
                </td>
                <td>
                    <%=Html.TextBoxFor(m => m.MailServer.Name, new { style = "width: 300px;", @class = "required" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Email (<font color="red">*</font>)
                </td>
                <td>
                    <%=Html.TextBoxFor(m => m.MailServer.Email, new { style = "width: 300px;", @class = "required" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Password (<font color="red">*</font>)
                </td>
                <td>
                    <%=Html.TextBoxFor(m => m.MailServer.Password, new { style = "width: 300px;", @class = "required" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Host (<font color="red">*</font>)
                </td>
                <td>
                    <%=Html.TextBoxFor(m => m.MailServer.Host, new { style = "width: 300px;", @class = "required" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Port (<font color="red">*</font>)
                </td>
                <td>
                    <%=Html.TextBoxFor(m => m.MailServer.Port, new { style = "width: 300px;", @class = "required" })%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Trạng thái
                </td>
                <td>
                    <%= Html.RadioButtonFor(m => m.MailServer.PubYN, true, new { @checked = "checked" })%>
                    Kích hoạt
                    <%= Html.RadioButtonFor(m => m.MailServer.PubYN, false)%>
                    Không kích hoạt
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" id="btnSave" value="Lưu lại" />
                </td>
            </tr>
        </tbody>
    </table>
    <%}
      } %>
       <script type="text/javascript">
        $(document).ready(function() {
            $("#adminForm").validate();
        });
        </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
    <%= Html.Toolbar("Quay lại", "/mailserver", "back")%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
	Sửa mail server
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
